<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<html>
<head>
	<title>封条管理及验证系统--安全防护管理</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<%@ include file="/comm.jsp"%>
<script language="javascript">
	$(document).ready(function() {
		$("#menu_1").mouseover(function() {
			$(this).css("background","#FFFFFF");
		});
		$("#menu_1").mouseout(function() {
			$(this).css("background","#EAF0FB");
		});
		$("#menu_2").mouseover(function() {
			$(this).css("background","#FFFFFF");
		});
		$("#menu_2").mouseout(function() {
			$(this).css("background","#EAF0FB");
		});
		$("#menu_1").click(function() {
			//$("#divTab1").show("fast");
			//$("#divTab2").hide("fast");
			$("#hdfStatus").val("01");
			$('#safetyInfo_list').submit(); 
		});
		$("#menu_2").click(function() {
			$("#hdfStatus").val("02");
			$('#safetyInfo_list').submit(); 
		});
	});
</script>
<style type="text/css">
<!--
fieldset {
    padding:10px;
    margin:10px;
    width:270px;
    color:#333; 
} 
legend {
    color:#06c;
    font-weight:800; 
} 

.menubar {width:100px; cursor:hand;}
	-->
</style>

	<body>
	<s:form name ="formpage" action="safetyInfo_list" namespace="/">
		<s:hidden id="hdfStatus" name="safetyInfoDto.status"/>
		<div align="center">
		<!-- 查询条件 -->
  		<%@ include file="/messages.jsp"%>
			<fieldset>
				<legend>
					查询条件
				</legend>
				<table align="center" width="800px" border="0">
					<tr>
						<td align="right">
							日期：</td>
						<td width="220px">
						<input id="dStartdate" name="safetyInfoDto.fromDate" 
						 value='<s:date name="#request.safetyInfoDto.fromDate" format="yyyy-MM-dd" />'
						 size="13" class="Wdate" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'dEnddate\')}'})"/> 
						至<input id="dEnddate" name="safetyInfoDto.toDate" 
						 value='<s:date name="#request.safetyInfoDto.toDate" format="yyyy-MM-dd" />'
						 size="13" class="Wdate" type="text" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'dStartdate\')}'})"/>
						</td>
						<td align="right">
							封条号码：</td>
						<td>
							<input name="safetyInfoDto.seqId" value="${safetyInfoDto.seqId}"  type="text" maxlength="20"
								size="15" value=""	onkeydown="focusNext('placeNo')" />
						</td>
						<td></td>
					</tr>
					<tr>
						<td align="right">
							账户代码：
							</td>
						<td>
							<input name="safetyInfoDto.userId" value="${safetyInfoDto.userId}"  type="text" maxlength="20"
								size="15"  value="" onkeydown="focusNext('seqId')" />
						</td>
						<td align="right">
							设施编号：
							</td>
						<td>
							<input name="safetyInfoDto.placeNo" value="${safetyInfoDto.placeNo}"  type="text" maxlength="20" size="15" value="" />
						</td>
						<td align="center">
							<input type="submit" class="button" id="ok" name="ok" value="查 询" />
							<input type="reset" class="button" id="resets" value="重 置" />
						</td>
					</tr>
				</table>
			</fieldset>
		</div>
			<!-- 选项卡 -->
			<table border="0" cellpadding="0" cellspacing="1" class="tb_input" id="tblone1">
				<tr class="list_tr_item">
					<td id="menu_1" class="td_title menubar">防护中的任务</td>
					<td id="menu_2" class="td_title menubar">已验证的任务</td>
					<td id="menu_2" class="td_title">&nbsp;</td>
				</tr>
			</table>
			<!-- 查询结果 1 -->
			<s:if test="#request.safetyInfoDto.status=='01'">
			<div id="divTab1">
			<table border="0" cellpadding="5" cellspacing="1" class="tb_datalist">
			 <tr align="center" height="28px" class="tr_title">
				<td>
					<b>业务单号</b>
				</td>
				<td>
					<b>创建时间</b>
				</td>
				<td>
					<b>封条号码</b>
				</td>
				<td>
					<b>设施名称</b>
				</td>
				<td>
					<b>设施编号</b>
				</td>
				<td>
					<b>施封人账户代码</b>
				</td>
				<!--
				<td>
					<b>施封人账户名称</b>
				</td>
				-->
				<td>
					<b>操作<b>
				</td>
			</tr>
			
			<s:iterator id="sa" value="#request.list1">
				<tr class="list_tr_item"
						onMouseOver="javascript:this.className='tr_selected';"
						onMouseOut="javascript:this.className='tr_even';">
					<td>
						<a
							href="<s:url action="safetyInfo_view"><s:param name="id">
							<s:property value="#sa.busiNo"/></s:param>
							</s:url>"><s:property value="#sa.busiNo" />
						</a>
					</td>
					<td>
						<s:date name="#sa.activeDate" format="yyyy-MM-dd HH:mm"/>	
					</td>
					<td>
						<s:property value="#sa.seqId" />
					</td>
					<td>
						<s:property value="#sa.placeName" />
					</td>
					<td>
						<s:property value="#sa.placeNo" />
					</td>
					<td>
						<s:property value="#sa.userId" />
					</td>
					<td>
						<a
							href="<s:url action="safetyInfo_editNoteinfo"><s:param name="id"><s:property value="#sa.busiNo"/></s:param>
							<s:param name="type"><s:property value="2"/></s:param>
							</s:url>" title="编辑备忘信息 , 仅自己可见">
						备忘
						<s:if test='#sa.noteInfo !=null'>${#sa.noteInfo.noteIndex}
								<img src="<%=request.getContextPath()%>/images/op_memo_<s:property value="#sa.noteInfo.noteIndex"/>.png" />	
						</s:if>
						</a>
					</td>
				</tr>
			</s:iterator>
		</table>
		</div>
		</s:if>
		
		<s:if test="#request.safetyInfoDto.status=='02'">
		<div id="divTab2">
			<table border="0" cellpadding="5" cellspacing="1" class="tb_datalist">
			 <tr align="center" height="28px" class="tr_title">
				<td>
					<b>业务单号</b>
				</td>
				<td>
					<b>创建时间</b>
				</td>
				<td>
					<b>封条号码</b>
				</td>
				<td>
					<b>设施名称</b>
				</td>
				<td>
					<b>设施编号</b>
				</td>
				<td>
					<b>施封人账户代码</b>
				</td>
				<!--
				<td>
					<b>施封人账户名称</b>
				</td>
				 -->
				<td>
					<b>验证人账户代码</b>
				</td>
				<!-- 
				<td>
					<b>验证人账户名称</b>
				</td>
				 -->
				<td>
					<b>操作<b>
				</td>
			</tr>
			
			<s:iterator id="sa" value="#request.list2">
				<tr class="list_tr_item"
						onMouseOver="javascript:this.className='tr_selected';"
						onMouseOut="javascript:this.className='tr_even';">
					<td>
						<a
							href="<s:url action="safetyInfo_view"><s:param name="id">
							<s:property value="#sa.busiNo"/></s:param>
							</s:url>"><s:property value="#sa.busiNo" />
						</a>
					</td>
					<td>
						<s:date name="#sa.activeDate" format="yyyy-MM-dd HH:mm"/>	
					</td>
					<td>
						<s:property value="#sa.seqId" />
					</td>
					<td>
						<s:property value="#sa.placeName" />
					</td>
					<td>
						<s:property value="#sa.placeNo" />
					</td>
					<td>
						<s:property value="#sa.userId" />
					</td>
					<td>
						<s:property value="#sa.verifyUserid" />
					</td>
					<td>
						<a
							href="<s:url action="safetyInfo_editNoteinfo"><s:param name="id"><s:property value="#sa.busiNo"/></s:param>
							<s:param name="type"><s:property value="2"/></s:param>
							</s:url>" title="编辑备忘信息 , 仅自己可见">
						备忘
							<s:if test='#sa.noteInfo !=null'>${#sa.noteInfo.noteIndex}
								<img src="<%=request.getContextPath()%>/images/op_memo_<s:property value="#sa.noteInfo.noteIndex"/>.png" />	
							</s:if>
						</a>
					</td>
				</tr>
			</s:iterator>
		</table>
		</div>
		</s:if>
		<s:property value="#request.allowpage" escape="false" />
		</s:form>
	</body>
</html>
